<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019-10-18
 * Time: 13:59
 */
namespace app\manage\validate;

use think\Validate;

/**
 * 行为验证器
 * @package app\menus\validate
 * @author
 */
class ProcessType extends Validate
{
    //定义验证规则
    protected $rule = [
        'name|投票标题'  => 'require',
        'status|投票状态'   => 'require',
        'sort|排序'   => 'require',
        '__token__' => 'token',
    ];

    //定义验证提示
    protected $message = [
        'name.require' => '请输入投票标题',
        'status.require' => '请选择状态',
        'sort.require' => '请输入排序规则',


    ];

    //定义验证场景
    protected $scene = [
        //更新
        'add'  =>  ['name','status','sort'],
    ];
}
